<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../css/bootstrap.min.css"/>
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="https://cdn.staticfile.org/vue/2.4.2/vue.min.js"></script>
    <script src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"></script>
    <script src="/js/auth.js"></script>
</head>
<body  style="background-color: #f5f5f5">
<div id="app" style="background-color: white;width: 1000px;height: 650px;text-align: center;margin: auto;">
    <div style="margin: 10px;background-color: hotpink">
        <span style="color: #00F7DE;font-size:30px ">积分排行榜</span>
    </div>
    <div>
    <table class="table table-striped">
        <thead>
        <tr>
            <td>账户id</td>
            <td>总积分</td>
            <td>排名</td>
        </tr>

        </thead>
        <tbody>
        <tr v-for="(ranking,index) in rankings">
            <td>{{ranking.uid}}</td>
            <td>{{ranking.totalintegral}}</td>
            <td>{{index+1}}</td>
        </tr>

        </tbody>
    </table>
    </div>
</div>
<script type="text/javascript">
    let p={headers}
    new Vue({
        el:"#app",
        data:{
            rankings:""
        },
        mounted(){
            axios.post(
                "/profile/integral/rank",p
            ).then(res=>{
                console.info(res.data.data)
                this.rankings=res.data.data;
            });
        }
    });
</script>
</body>
</html>